Skip to content

[6.19.z] Automation for SAT-32425 - #20895

Merged
vsedmik merged 1 commit into
SatelliteQE:6.19.zfrom
LadislavVasina1:619AutomationSAT-32425
Feb 26, 2026
Merged

[6.19.z] Automation for SAT-32425#20895
vsedmik merged 1 commit into
SatelliteQE:6.19.zfrom
LadislavVasina1:619AutomationSAT-32425

Conversation

@LadislavVasina1

@LadislavVasina1 LadislavVasina1 commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Manual CP of #20888
Needs: SatelliteQE/airgun#2324

Summary by Sourcery

Tests:

  • Add a customer-scenario UI test ensuring only a single Library lifecycle environment option is shown in the Create Host form when location is set to Any location.

@LadislavVasina1 LadislavVasina1 self-assigned this Feb 26, 2026
@sourcery-ai

sourcery-ai Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds a new UI test to verify that only a single 'Library' lifecycle environment option is shown in the Create Host form when organization is set and location is set to 'Any location'.

File-Level Changes

Change Details Files
Add regression UI test ensuring only one 'Library' LCE option appears in the Create Host form for any-location context.
  • Import DEFAULT_ORG constant for use in new test
  • Create test that opens a UI session, selects a default organization and 'Any location' context
  • Open the host creation form and lifecycle environment dropdown filter
  • Assert that the filter contents contain the 'Library' string exactly once
tests/foreman/ui/test_host.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@LadislavVasina1 LadislavVasina1 added No-CherryPick PR doesnt need CherryPick to previous branches 6.19.z labels Feb 26, 2026
@LadislavVasina1

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k 'test_positive_only_single_library_option_in_create_form'
airgun: 2324

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The assertion filter_content.read().count('Library') == 1 is fairly brittle; consider asserting against the actual LCE option elements (or a more specific locator) instead of a raw text count to avoid false positives from other occurrences of the word "Library".
  • After open_filter.click(), it may be safer to wait for the LCE options to be visible/loaded (e.g., via an explicit wait on a specific element) before reading filter_content to reduce flakiness.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The assertion `filter_content.read().count('Library') == 1` is fairly brittle; consider asserting against the actual LCE option elements (or a more specific locator) instead of a raw text count to avoid false positives from other occurrences of the word "Library".
- After `open_filter.click()`, it may be safer to wait for the LCE options to be visible/loaded (e.g., via an explicit wait on a specific element) before reading `filter_content` to reduce flakiness.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 14498
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_host.py -k test_positive_only_single_library_option_in_create_form --external-logging
Test Result : ========== 1 passed, 93 deselected, 10 warnings in 1186.00s (0:19:46) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Feb 26, 2026
@vsedmik
vsedmik enabled auto-merge (squash) February 26, 2026 13:05
@vsedmik
vsedmik force-pushed the 619AutomationSAT-32425 branch from ca20514 to 4cd1a52 Compare February 26, 2026 13:06
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Feb 26, 2026
@vsedmik
vsedmik merged commit b13b33b into SatelliteQE:6.19.z Feb 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.19.z No-CherryPick PR doesnt need CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants